﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.SearchService.ObjectSelectorHandlerWithLabelsAttribute
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using System;

#nullable disable
namespace UnityEngine.SearchService
{
  /// <summary>
  ///   <para>A class attribute that allows you to define label constraints on a MonoBehavior or ScriptableObject's field in the object selector.</para>
  /// </summary>
  [AttributeUsage(AttributeTargets.Field)]
  [Obsolete("ObjectSelectorHandlerWithLabelsAttribute has been deprecated. Use SearchContextAttribute instead.")]
  public class ObjectSelectorHandlerWithLabelsAttribute : Attribute
  {
    /// <summary>
    ///   <para>The labels to match.</para>
    /// </summary>
    public string[] labels { get; }

    /// <summary>
    ///   <para>Boolean that indicates whether all labels, or only one of them, should match. Default is true.</para>
    /// </summary>
    public bool matchAll { get; }

    /// <summary>
    ///   <para>Constructor used to declare the SearchService.ObjectSelectorHandlerWithLabelsAttribute on a field.</para>
    /// </summary>
    /// <param name="labels">An array of strings that represents the different labels to use as constraints.</param>
    /// <param name="matchAll">This parameter specifies whether all labels must match, or only one of them must be present.</param>
    public ObjectSelectorHandlerWithLabelsAttribute(params string[] labels)
    {
      this.labels = labels;
      this.matchAll = true;
    }

    /// <summary>
    ///   <para>Constructor used to declare the SearchService.ObjectSelectorHandlerWithLabelsAttribute on a field.</para>
    /// </summary>
    /// <param name="labels">An array of strings that represents the different labels to use as constraints.</param>
    /// <param name="matchAll">This parameter specifies whether all labels must match, or only one of them must be present.</param>
    public ObjectSelectorHandlerWithLabelsAttribute(bool matchAll, params string[] labels)
    {
      this.labels = labels;
      this.matchAll = matchAll;
    }
  }
}
